package com.financial.business.management.utils;

/**
 * @anthor wenguoqiang
 * @date: 2019/02/22 16:03
 * @company 够样
 * @des
 **/
public class YsUtils {

    /**
     * 银盛报备对于平台id 补齐位数
     * @param str
     * @param strLength
     * @return
     */
    public static String addZeroForNum(String str, int strLength) {
        int strLen = str.length();
        StringBuffer sb = null;
        while (strLen < strLength) {
            sb = new StringBuffer();
            sb.append(" ").append(str);// 左补0
            str = sb.toString();
            strLen = str.length();
        }
        str = str.substring(0,8);
        return str;
    }
}
